home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: Aug 15 1996
- //
- // Description:
- // This script initializes the Time slider. Initialization involves
- // determining the initial Time slider preferences, creating the UI
- // and setting the initial visibility.
- //
- {
- // Declare referenced or returned globals.
- //
- global string $gPlayBackSlider;
-
- // Create the time slider.
- //
- if( `exists timeSlider` ) {
- eval "source timeSlider";
- }
-
- //////////////////////////////////////////////////////////
- //
- // ANIMATION CONTROLS
- //
- //////////////////////////////////////////////////////////
-
- // Height
- //
- timeControl -e -h `optionVar -q timeSliderHeight` $gPlayBackSlider;
-
- // Key Ticks
- //
- string $showKeysVal = `optionVar -q timeSliderShowKeys`;
- if ($showKeysVal != "active" && $showKeysVal != "none") {
- // If optionVar contains name of the channel box, make sure
- // it is using the proper name for the channelbox.
- //
- $showKeysVal = "mainChannelBox";
- optionVar -sv timeSliderShowKeys "mainChannelBox";
- }
-
- timeControl -e -showKeys $showKeysVal $gPlayBackSlider;
-
- // Options: Timecode
- //
- animDisplay -tc `optionVar -q timeSliderTimeCode`;
-
- // Options: Snapping
- //
- timeControl -e -snap `optionVar -q timeSliderSnapping` $gPlayBackSlider;
-
- // Timecode Offset
- //
- animDisplay -timeCodeOffset `optionVar -q timeSliderTimeCodeOffset`;
-
- //////////////////////////////////////////////////////////
- //
- // PLAYBACK
- //
- //////////////////////////////////////////////////////////
-
- // Update View
- //
- playbackOptions -v `optionVar -q timeSliderPlayView`;
-
- // Looping
- //
- playbackOptions -l `optionVar -q timeSliderPlayLoop`;
-
- // Playback Speed
- //
- playbackOptions -playbackSpeed `optionVar -query timeSliderPlaySpeed`;
-
- // Playback By
- //
- playbackOptions -by `optionVar -q timeSliderPlayBy`;
-
- //////////////////////////////////////////////////////////
- //
- // KEYS
- //
- //////////////////////////////////////////////////////////
-
- // Auto Key
- //
- autoKeyframe -state `optionVar -q autoKeyframeState`;
-
- // Weighted Tangents
- //
- keyTangent -g -weightedTangents `optionVar -q weightedTangents`;
-
- // Default in tangent
- //
- keyTangent -g -inTangentType `optionVar -q inTangentType`;
-
- // Default out tangent
- //
- keyTangent -g -outTangentType `optionVar -q outTangentType`;
-
- //////////////////////////////////////////////////////////
- //
- // SOUND
- //
- //////////////////////////////////////////////////////////
-
- // Waveform Display
- //
- timeControl -e -waveform `optionVar -q timeSliderSoundDisplay`
- $gPlayBackSlider;
-
- // Repeat on Hold
- //
- timeControl -e -roh `optionVar -q timeSliderRepeatOnHold`
- $gPlayBackSlider;
-
- // Repeat Size
- //
- timeControl -e -rcs `optionVar -q timeSliderRepeatChunk`
- $gPlayBackSlider;
-
- //////////////////////////////////////////////////////////
- //
- // MISCELLANEOUS
- //
- //////////////////////////////////////////////////////////
-
- // Bind the time slider's selection connection to the animation list
- //
- timeControl -e -mainListConnection animationList $gPlayBackSlider;
-
- // Create the time dragger 3D slider
- //
- timeDragger;
-
- // Set the Time slider's initial visibility.
- //
- setTimeSliderVisible( `optionVar -query timeSliderVisible` );
- }
-